use redis::Client;

pub async fn gen_pool(redis_dsn: String) -> Result<redis::aio::MultiplexedConnection, String> {
    let client = Client::open(redis_dsn).map_err(|e| e.to_string())?;
    let conn = client
        .get_multiplexed_async_connection()
        .await
        .map_err(|err| err.to_string())?;

    Ok(conn)
}
